home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11515 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  791 b 

  1. Path: isum2.iastate.edu!cakamman
  2. From: cakamman@iastate.edu (Chris A Kamman)
  3. Newsgroups: comp.lang.c++
  4. Subject: Header files and friend functions!
  5. Date: 14 Mar 96 22:27:23 GMT
  6. Organization: Iowa State University, Ames, Iowa
  7. Message-ID: <cakamman.826842443@isum2.iastate.edu>
  8. NNTP-Posting-Host: isum2.iastate.edu
  9.  
  10. Hi,
  11.  
  12.     I have a list.cpp file that contains all the code including
  13. main.
  14.  
  15.     I would like to separate them into list.cpp main.cpp - and
  16. a header file list.h.
  17.  
  18.     Most of the compilation phase goes smoothly. However, I have a
  19. couple of friend functions ( as templates - to print out the data). How
  20. can I declare these as extern?
  21.  
  22. I tried extern template<class T> ostream &operator << (ostream
  23. &str,List<T> &obj);
  24.  
  25. But I get errors  - Using VC4.0, on Winnt3.51.
  26.  
  27. Thanks for any help.
  28.  
  29.